package com.org.project;

import java.io.IOException;

import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.HttpTransportSE;
import org.xmlpull.v1.XmlPullParserException;

public class Test {
	public static void main(String[] args) throws Exception{
	String url="http://ws.webxml.com.cn/WebServices/WeatherWS.asmx?wsdl";
    String ns="http://WebXml.com.cn";
    String action="getRegionProvince";
    HttpTransportSE trans=new HttpTransportSE(url);
    SoapSerializationEnvelope envelope=new SoapSerializationEnvelope(SoapEnvelope.VER11);
    SoapObject body=new SoapObject(ns, action);
    body.addProperty("getRegionProvinceResult","mao");
    envelope.setOutputSoapObject(body);
    trans.call(ns+"/"+action, envelope);
    SoapObject so=(SoapObject)envelope.getResponse();
    for(int i=0;i<so.getPropertyCount();i++){
    	System.out.println(so.getProperty(i));
    }
}
}